#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

const int N = 1000010;
int a[N];

int main()
{
    int T;
    cin >> T;
    for(int cases = 1; cases <= T; cases++)
    {
        int n, s;
        cin >> n >> s;
        int res = 0;
        for (int i = 0; i < n; i ++ ) cin >> a[i];
        for (int i = 0; i < n; i ++ ) res += a[i];
        if(res == s) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}